package book;


public class BookList {
    private  Book[] books=new Book[10];
    private  int number;
    public BookList(){
        this.books[0]=new Book("三国演义","罗贯中",19,"小说");
        this.books[1]=new Book("西游记","吴承恩",35,"小说");
        this.books[2]=new Book("红楼梦","曹雪芹",45,"小说");

        this.number=3;
    }

    public Book getBook(int i) {
        return books[i];
    }

    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number += number;
    }
}